#{extends 'main.html' /}
#{set title:'Admin overview' /}
#{set 'moreScripts'}
    <script src="@{'/public/javascripts/jquery.dataTables.min.js'}" type="text/javascript" charset="${_response_encoding}"></script>
    <script>
        $(document).ready( function() {
            oTable = $('.offerTable').dataTable( {
            	"bSearchable": false,
            });
        });
    </script>
#{/set}

<a class="text" href="@{AdminInterface.showEvents()}">Show all events</a> 
<a class="text" href="@{AdminInterface.showInactiveEvents()}">Show inactive events</a><br>
<a class="text" href="@{AdminInterface.showUsers()}">Show users</a><br>

<h2>Offers for ${event.name} - ${event.city}</h2>
<a href="@{AdminInterface.index()}">back</a>
<table cellpadding="0" cellspacing="0" border="0" class="offerTable" id="offerTable">
	<thead>
	<tr><th>Offerer</th><th>Active</th></tr>
	</thead>
	<tbody>
	#{list offers, as:'offer'}
		<tr><td><a href="@{Offers.show(offer.id)}">${offer.user.firstname} ${offer.user.lastname}</a></td><td>${offer.active}</td></tr>
	#{/list}
	</tbody>
</table>